home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / news / thor / rexx / gmspoll.thor < prev    next >
Text File  |  1998-05-24  |  2KB  |  68 lines

  1. /* GMS_Poll.thor by Roy Brown (Roy@ebrown.demon.co.uk)
  2. ** $VER: GMS_Poll.thor 1.0 (12.11.95)
  3. **
  4. ** An ARexx script that automatically runs GMS to poll a BBS selected
  5. ** from a requester. The script assumes that you have configured a GMS
  6. ** line for each Boss (numbered 1, 2 etc - NOT Line 0 which is the default
  7. ** line - see the GMS docs).
  8. **
  9. ** This script should be added to your Arexx Script menu.
  10. */
  11.  
  12. /* Enter the path to gms_mailer. */
  13.  
  14. GMS_Path="GMS:Bin/"      /* must end with either ":" or "/" */
  15.  
  16. /* Modify the next line (no spaces) to show each BBS name that you poll from.
  17. ** This is the text that will appear on the buttons in the requester. If you
  18. ** want to make the boss you poll most often the default (i.e. press return to
  19. ** call), make it the first entry. Use the underscore (to the left of the
  20. ** 'equals/plus' key) to indicate the keyboard shortcut.
  21. */
  22.  
  23. BUTTEXT="_Amigo|_FrostFree"
  24.  
  25. /* Enter your total number of bosses */
  26.  
  27. BOSSES=2
  28.  
  29. /* Please do not alter anything below here. Thank you.*/
  30.  
  31. options results
  32.  
  33. /* Check to see if Thor REXX port available*/
  34.  
  35. p = ' ' || address() || ' ' || show('P',,)
  36. thorport = pos(' THOR.',p)
  37.  
  38. if thorport > 0 then thorport = word(substr(p,thorport+1),1)
  39. else
  40. do
  41.     say 'No THOR port found!'
  42.     exit 10
  43. end
  44.  
  45. /* If more than one Boss configured above, open a requester to select the BBS
  46. ** to poll. Otherwise run GMS using line 0 configuration (the default line).
  47. */
  48.  
  49. select
  50.      when BOSSES=1 then line=0
  51.      when BOSSES>1 then
  52.        do
  53.           address(thorport)
  54.           THORTOFRONT
  55.           REQUESTNOTIFY TEXT '"Select BBS to poll"' BT ''||BUTTEXT||'|_Cancel'
  56.           line=result
  57.           if line=0 then exit
  58.        end
  59. end
  60.  
  61. /* Run GMS */
  62.  
  63. address command "run >nil: "||GMS_Path||"gms_mailer line "||line
  64.  
  65. exit
  66. ..........................................................................................
  67.  
  68.